<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
    <script src="https://cdn.staticfile.org/vue-router/2.7.0/vue-router.min.js"></script>
</head>


<body>

    <div id="app">
        <router-view></router-view>
        <div class="container">
            <router-view></router-view>
            <router-view></router-view>
        </div>
    </div>
    <template id="sidebar">
        <div class="sidebar">
            侧边栏内容
        </div>
    </template>
    <script>
        const header = {
            template: '<div class="header">头部内容</div>'
        }
        const main = {
            template: '<div class="main">主要内容</div>'
        }
        const sidebar = {
            template: '#sider'
        }
        const router = new VueRouter({
            routes: [
                {
                    path: '/',
                    component: header
                },
                {
                    path: '/',
                    component: sidebar
                },
                {
                    path: '/',
                    component: main
                },

            ]
        })
        const app = new Vue({
            el: "#app",
            data() {
                return {

                }
            },
            router: router
        })
    </script>
</body>

</html>
